package network
{
	import events.MyEvent;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	import flash.net.NetworkInfo;
	import flash.net.InterfaceAddress;
	import flash.net.IPVersion;
	import flash.net.NetworkInterface;
	
	/**
	 * ...
	 * @author FireKnight
	 */
	public final class NetworkCardInformation extends EventDispatcher
	{
		private var interfaces:Vector.<NetworkInterface>;
		public const NETWORKCARDINFORMATION:String = "NETWORKCARDINFORMATION";
		
		public function NetworkCardInformation(target:IEventDispatcher = null)
		{
			super(target);
		}
		
		public function update():void
		{
			if (!interfaces)
			{
				interfaces = null;
			}
			trace("NetworkInfo.isSupported="+NetworkInfo.isSupported)
			interfaces = NetworkInfo.networkInfo.findInterfaces();
			//trace("interfaces="+interfaces);
			this.dispatchEvent(new MyEvent(NETWORKCARDINFORMATION, interfaces));
		}
	
	}

}